package com.itheima.job;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.service.ClearOrderService;

public class ClearOrderJob {

    @Reference
    ClearOrderService clearOrderService;

    public void cleanOrder(){

        try {
            clearOrderService.deleteLastMonthOrder();
            System.out.println("定时任务删除了上月最后一天之前的所有数据");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
